package longcaisuyun.longcai.com.net;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Administrator on 2016/4/6.
 */
@HttpInlet(Net.MyDATA)
public class PostMain extends WHAsyPost<PostMain.Info>{
    public  String  driverid;
    public PostMain(String id, AsyCallBack asyCallBack) {
        super(asyCallBack);
        this.driverid=id;
    }

    @Override
    protected Info parser(JSONObject object) {
        Info   info=new Info();
        try {
            info.message=object.getString("message");

            if(info.message.equals("0")){

            }else{
                info.picurl=object.getString("picurl");
                info.telephone = object.getString("telephone");
                info.username=object.getString("username");
                info.monthincome=object.getString("monthincome");
                info.balance=object.getString("balance");

            }
            return info;
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return null;
    }

    public static class Info {
        public String message;
        public String picurl;
        public String username;
        public String monthincome;
        public String balance;
        public String telephone;

    }

}
